const mongoose = require('mongoose');
const log = require('../libs/log4js')('TESTDB');
const DBUtils = require('./utils');
const testSchema = mongoose.Schema({
  id: String,
  age: Number,
  createDate: String,
  updateDate: String
});

const Test = mongoose.model('testTable', testSchema);
const db = new DBUtils({
  DB: Test,
  logName: 'Test'
});
const insert = db.insert.bind(db);
const query = db.queryAll.bind(db);
const update = db.update.bind(db);
const del = db.deleteOne.bind(db);
const delM = db.deleteMany.bind(db);
module.exports = {
  insert,
  query,
  update,
  del,
  delM
};

